Okay, so in today's lesson we are going to be having a look at part effects.
Now there are quite a few effects um, to do with the parts.
Um, some of them we are going to look at in this bit of the course, some others we're going to look
later on in the course because they are a bit more advanced.
They require something which you're going to learn about, um, later on in the course.
And even then there's still quite a few to look at.
So this will be split up into two lessons.
The first one we're going to be looking at, um, a couple of them, and the second one, which will
be next, and next lesson will be looking at the other two.
Okay.
So these are effects that you can add in two parts.
And they make your game look a bit more alive almost.
Things are going on and look a bit more realistic.
You could say.
So first off add a part into the workspace and we're going to move that just over here out of the way.
So this is our part here.
Cool.
So let's click on the plus.
And usually we've just been searching up objects up in the search object bar.
But we're actually going to scroll down because you can see that there's certain sections with different
objects in them.
And we're going to scroll down until you see the effects section which has been explosion, fire highlight
and so on.
Okay.
And the first one we're going to look at is the explosion.
Okay.
So this creates an explosion okay.
Um, the difference with this one though is that the other ones that we look at, they, um, continue
to play.
How would the explosion only plays once?
So once you add the explosion in, it plays and that's it, unfortunately.
So left click that and it actually adds the explosion over there.
If we add do it again.
So let's add in the explosion again.
You can see that's what it kind of looks like there I'll show you one more time.
Okay.
That's the explosion that you that you're looking at.
So let's click on the explosion.
So left click on the explosion object here.
And how the explosion works.
Is it the explosion explodes.
Um, as soon as it's added or as soon as the game is played basically.
So it's not something that it explodes every couple seconds.
It just does it once and that's it.
So you might think, um, well, how could I make something explode at a certain time, like if I want
it to explode?
Um, I don't know, 10s into my game, for example, that you would have to use scripts for, unfortunately.
So you might come back to explosions a bit when we look at scripting.
Um, but for now, we're still going to talk about it and look at its properties.
So, um, first off, let's look at position as one thing we noticed was that it didn't actually explode
at where the part is.
It exploded at the center because its position has been set to 000, which is zero along the X, zero
along the Y and zero along the Z.
But obviously we can change that.
So if we were to go to the part and look down at the parts position, the parts position is currently
this here, which is not a nice number, I haven't turned on my snap to grid, so let's do that instead.
Let's make it easier for myself.
And I'm going to just change these numbers.
So that will be minus nine.
That will be 0.5 and that will be -35.
Just have a nice numbers to work with.
I'm then going to copy this position by just highlighting it all and pressing command C for me, but
just whatever shortcut copies it to your clipboard and then paste it in the position property there.
And now you can see actually it does do it again, but um, it now can I do that again?
If I change it 3455 it doesn't only does it once, I think.
Yeah.
But um, it then added it at that area there, which is really good.
Okay.
Um, other ones we have um, a property called visible.
This is obviously whether the explosion is visible or not.
Okay.
Um, reasons why you might want to make the explosion not visible is because, um, what the explosion
can do is one, if you're close enough, it can actually kill the player, or it can kind of move the
player out of the way a bit, which is might you might want to use, um, without actually knowing it's
an explosion.
Um, I don't know.
Massively crazy example.
Say you've got a game where a nuclear bomb, um, you know, erupts and, um.
I guess in that case, um, you can you can use a explosion to kind of simulate the idea of the force
field kind of hitting you and kind of go back.
You would basically get thrown back by it.
Um, but yeah, basically you could use the, um, the blast pressure and blast radius, which are the
properties we're going to have a look at in a minute to kind of simulate whatever you're trying to get
without playing, knowing that you're actually using an explosion for it.
Um, blast pressure and blast radius.
Okay.
Blast pressure is basically how much force?
Um, the explosion is putting onto the player and by force.
Basically, it's how strong it is.
Okay, the larger the number of blast pressure, the bigger and more violent the explosion is going
to be.
Okay.
So it just depends on what you want.
If it's if it's, um, from I don't know, um, some, some of them are really small explosion.
Like a car's tire popping to, you know, extreme example, a nuclear bomb or some kind of bomb.
Um, you have a much larger.
Okay.
It's set to.
What number is that?
That is, it's set to 500,000 to start off with.
So you can kind of go off of that by just changing the number.
If we were to change it to 10,000, it'd be much larger than if it was or even 100,000, you can see.
Does it make a visual difference?
I don't think it does make too much of a visible visual difference.
Um, I think it's more so that, um.
Oh, you can see here, setting it to zero means it's just a graphical effect, and setting any higher
means actually starts to affect players around it.
Blast radius is how large the explosion is.
Change that to ten, and it's a much larger explosion.
Then if you change it to one, it seems to just be, um, not changing that much to be honest.
That's two.
And you put it to 200.
Yeah.
I don't think it changes it too much.
A hundred is the maximum amount of it.
Um, this is this is a circle starting from the center and the largest property of a larger circle.
Okay, so the blast radius is more so the circle of destruction.
So the area around it that will be affected by it, not so much the size of it, more so just the area
around it that is affected.
Um, you can see that for a couple of these properties, if you hover over them, they'll give you a
little description of them, which is really useful because, um, sometimes you will forget parts of
properties or you won't know exactly what that specific property means, because let's face it, there
are thousands of properties, um, different properties, and you're bound to forget a couple sometimes
even that wasn't, um, didn't know, for example, that you could change this to zero and it would
just be graphical.
So it really is just a really good idea to sometimes look at that.
Let's change it back up there.
Um, destroyed joint radius percent.
Um, is the area around it, which basically if the player is at it will destroy their joints.
Now, what we mean by destroying the player's joints basically means killing the player.
Okay.
So, um, this is the area around it.
If the higher the number you set this to.
Um, so I think the max.
Okay.
Yeah.
So the max is one, you can't go any higher than 0.1%.
It just goes to one.
And that would mean that, um, if you're in that area, it's guaranteed that the player is going to
die.
Okay.
However, if you set it to 0.1, for example, or 0.5, there is a chance that a player will not die.
So it's up to you whether you want it to be an instant kill kind of thing, or if you just want it to
be visual.
And the other ones we have here is explosion type, and we click on this and click on my dropdown arrow.
It's basically does it leave a crater or does it not leave a crater.
So no craters looks like that.
And craters looks like that's again, I don't think there's too much of a visible visual difference.
Um, you can see there.
Um, I think we'd have to turn the blast pressure up a bit.
Maybe.
But some some do leave craters if they're large enough.
Um, I think it's more if you have terrain and stuff, which we learn later on.
Um, but yeah.
And then obviously we have Explosion and Parent, which you can name and change the parent of the explosion,
but we don't really need to do that.
Um, for a lot of these effects, um, the properties.
So yeah, obviously some of the properties here you wouldn't have encountered before.
Um, the we'll be looking at a lot of new properties today.
Um, not all of them, however, are that useful, as you can see with explosion.
Um, they don't actually change that much.
Um, so it's up to you whether you want to look into the properties and stuff.
Um, I would recommend playing around with them and trying them out, but, um, they're not they're
not like, um, properties of the part which you're going to be using every time you make a game, for
example, these are ones that you just might use now and then.
So they're not as important to learn.
They're still important, but not as important as like properties of the part, for example which which
come up again and again.
Okay.
That is explosion.
Next up we're going to have a look at the fire.
Now a fire effect looks something like this here.
Okay.
And you probably have seen this somewhere in a game before.
Let's go down and have a look at its properties.
So colour is quite simply the colour of the fire.
Okay.
You can change it like that.
There.
To change the colour of it I'm going to set it to like a red kind of fire.
Looks quite cool, but you can change it to whatever colour you'd like.
Enabled is a tick box, whether fire is on or if it's off.
Okay, heat.
Heat is how hot it appears to be.
So basically how, you know, large and violent it appears to be a heat of 100 or 100 is 25 is the max,
and that's the largest it can get over.
The hottest it can look.
Whereas if you said it's something like one, for example, it looks a lot, um, less violent, for
example.
Okay, let's set it to about ten.
Um, let's give over a name and parent.
We know what those do already.
Secondary color.
And there's a small kind of brown tint around the side of it.
It might be a bit difficult to see, but if I was to change it to a different color, let's say let's
make it brighter and change it to like a blue.
Maybe.
Could you see, like up here?
Yeah, you could see it a bit better up here.
The kind of blue color there.
So this is really weird for you.
You wouldn't use red and blue for a fire.
Um, but it just gives you examples of how those are used.
Um, usually the secondary color would just be a darker version of the original color you picked.
So like a darker, darker kind of red like that.
There would be the most realistic size is just the visual size of the fire.
So set that to ten and the fire is just larger.
So it's like, what's the maximum?
Maximum is 30.
And this is the maximum size of the fire that you can.
So the max set the max settings, you have 25 heat and 30 size.
And that's what it looks like there which is really cool.
It's brings kind of um, it brings life to your game because things are moving around and visually happening.
So they're really cool.
To have a go at timescale is another one.
I think it was an explosion as well.
Was it?
Yeah.
We didn't cover that.
Um, timescale is how fast it's happening.
So if we set timescale to zero, it's like a freeze frame.
It's kind of stopped.
Okay.
Um, however, if you set the timescale a bit higher, let's say 0.1, it just happens slower.
So it's um, one is like the typical speed and then zero is, it's completely still.
And so and you can go from 0 to 1.
So you can use this bar here to increase it kind of looks like there something you might want to aspire
to be a bit slower for example, or something like that.
You can do it using that method.
Okay, let's turn enabled off for now and look at the last one for today, which is going to be smoke.
Now this kind of pairs with fire because if you've got fire you're probably also going to have smoke
as well.
So smoke has a color.
So let's click on my color property there.
And it's the same kind of thing.
You just pick what color you want the smoke to be.
So you can have a kind of green yellowy smoke if you wanted to.
Almost like a sandstorm.
Could be quite cool idea for that one.
Or like a blue kind of smoke which could be like or red red smoke for like flares and things like that.
You could do as well.
Um, but yeah, let's do the flare example.
Um, using that there.
Um, let's go down.
We have opacity, which is basically the amount you can see through it.
So an opacity of one means that you cannot see through this fire if you're inside the fire.
I cannot see around me at all.
Okay.
Have an opacity of zero basically means it's invisible.
Okay.
So it's kind of the opposite of transparency because a transparency of um, a transparency of zero means
you it's not transparent at all.
You can completely you can see it and you cannot see behind it, like this part, for example, this
part of the transparency of zero opacity is basically the opposite.
Um, again, I'm not too sure why they chose to use opacity rather than transparency sometimes.
Um, some things in Roblox studio can be a little bit strange.
Um, but you just need to know them anyway.
Um, rise velocity is an interesting one.
It might sound a bit confusing.
Velocity might sound a bit confusing to you, but all it is is just how far up the smoke goes.
So change that to two, for example, and the smoke just rises more.
Um, if you change it to maybe five, it might be a bit more obvious what it does.
You can see where the smoke is rising up more.
Okay.
Um, size again, the size of the smoke.
Quite a lot of these properties are a bit repetitive for, um, a lot of the effects.
Ten for the size makes it much larger.
Like that's fair.
And of course, the time scale, um, is how fast you want this smoke to be moving or put it to set
it to zero and it'll be completely still.
This actually, this is a use.
I just thought of it for now, actually.
But if we set the color to be like a, um, a white kind of color like that, there could be really
good for like, fog, almost.
Um, because if you set the time scale to zero.
Um.
Fog.
Of course, fog in real life does move, but if we're using smoke for it, you could just duplicate
some of these parts.
Of course, they're going to be exploding as well.
And, um, return smoke.
We'll need to turn this 1 to 1 so it comes up first.
And then set it to zero.
And you can see that it actually does kind of look like a smoke machine or something like that you could
use.
So they do have a lot of applications.
They are very, very useful to use in your game.
Let's set it back to 0.5.
And if you compare this with the fire for example, and it starts to look well, the fire is a bit too
high for the amount of smoke we have.
If we turn, if we make the smoke go a bit higher, let's say 20, what's the maximum for this 20 we
can do so and let's change the time scale to one.
So smoke is going to go up much higher.
And that's kind of looking a bit better.
You've got the fire there.
Maybe the fire we change to be a bit of a more realistic color like that there.
And change the heat down a bit, maybe to 15 and the size maybe to 15 as well.
And you can start to see how this could look quite cool in a game.
Um, so yeah, just some examples on some of the part effects that you can add in.
Okay.
We're going to look at two more in our in your next in the next lesson.
So have a play around with those.
They are quite they are quite cool.
And join me in the next lesson where we're going to have a look at the other two.